﻿Namespace EIBData.DPT
    Public NotInheritable Class EIBDataDPT_23_001
        Inherits EIBDataDPT_23_Base

        Public Enum EIBDataDPT_23_001_Values
            Off = 0
            [On] = 1
            OffOn = 2
            OnOff = 3
        End Enum

        Protected _value As EIBDataDPT_23_001_Values = Nothing


        Sub New(data As Byte())
            MyBase.New(data)

            _value = _valueBase
        End Sub

        Sub New(value As EIBDataDPT_23_001_Values)
            MyBase.New(value)

            _value = value
        End Sub


        Public Overrides Function ToInfoList() As List(Of EIB.InfoBase)
            Dim list As New List(Of EIB.InfoBase)

            list.Add(New EIB.Info("Type", DPT_Name))
            list.Add(New EIB.Info("Value", String.Format("{0} (0x{0:X})", _value)))

            Return list
        End Function

        Public Shared Shadows ReadOnly Property DPT_Name As String
            Get
                Return "DPT_OnOffAction"
            End Get
        End Property

        Public Shared Shadows ReadOnly Property DPT_Number As String
            Get
                Return "23.001"
            End Get
        End Property

        Public Overrides Function ToString() As String
            Return _value
        End Function

        Public Overloads ReadOnly Property Value As EIBDataDPT_23_001_Values
            Get
                Return _value
            End Get
        End Property
    End Class
End Namespace